<!--
- @founder   IT柏拉图, https: //weibo.com/itprato
- @author    DedeCMS团队
- @copyright Copyright (c) 2007 - 2021, 上海卓卓网络科技有限公司 (DesDev, Inc.)
--->

<html>
<head>
<meta charset="{dede:global.cfg_soft_lang/}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>增加自定义标记</title>
<meta name="copyright" content="2007-2021 DedeCMS, 上海卓卓网络科技有限公司 (DesDev, Inc.)" />
<link rel="icon" href="/favicon.ico" />
<!-- CSS FILES -->
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_assets_dir/}/pkg/uikit/css/uikit.min.css" />
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_assets_dir/}/css/manage.dede.css">
<style type="text/css">
.uk-table td{
padding: 6px 12px;
vertical-align: top;
height: 35px;
}
</style>
</head>
<body>
<!-- 列表头部 -->
<div id="Table_Header_202X2W2X1X292F" class="uk-card uk-card-small uk-card-default" uk-sticky="bottom: #offset">
<div id="Header_1W2T2S2T1V252B" class="uk-card-header">
<div class="uk-grid uk-grid-small uk-text-small">
<span><ul class="uk-breadcrumb"><li><a href="mytag_main.php">自定义标记管理</a></li><li><span>增加自定义标记</span></li></ul></span>
</div>
</div>
</div>
<!-- /列表头部 -->
<!-- 列表主体 -->
<div class="uk-card uk-card-small uk-card-default" style="top:-20px;margin-bottom: 50px;">
<div class="uk-card-body uk-overflow-auto" grid>
<div class="uk-child-width-1-1 uk-padding">
<table width="98%" border="0" cellpadding="1" cellspacing="1" class="uk-table">
<form action="mytag_add.php" method="post">
<input type='hidden' name='dopost' value='save' />
<input type="hidden" name="token" value="<?php echo make_hash();?>" />
<!-- 选项 -->
<tr>
<td colspan="3">
<div>
<h4>自定义标记的调用方法：</h4>
<ul class="uk-list uk-list-disc uk-list-muted">
<li>dede:mytag name='标记名称' ismake='是否含板块代码（yes 或 no）' typeid='栏目ID'/</li>
<li>name 标记名称，该项是必须的属性，以下 2、3是可选属性；</li>
<li>ismake 默认是 no 表示设定的纯HTML代码， yes 表示含板块标记的代码；</li>
<li>typeid 表示所属栏目的ID，默认为 0 ，表示所有栏目通用的显示内容，在列表和文档模板中，typeid默认是这个列表或文档本身的栏目ＩＤ</li>
</ul>
</div>
</td>
</tr>
<tr>
<td width="15%">所属栏目：</td>
<td colspan="2">
<?php
$tl = new TypeLink(0);
$typeOptions = $tl->GetOptionArray(0,0,0);
echo "<select name='typeid' class='uk-select uk-form-small uk-form-width-large'>\r\n";
echo "<option value='0' selected>显示在没有继承本标记的所有栏目</option>\r\n";
echo $typeOptions;
echo "</select>";
?>
</td>
</tr>
<tr>
<td>标记名称：</td>
<td colspan="2"><input name="tagname" type="text" id="tagname" class='uk-input uk-form-small uk-form-width-large'/></td>
</tr>
<tr>
<td>时间限制：</td>
<td colspan="2">
<input type="radio" name="timeset" value="0" checked class='uk-radio'/> 永不过期 &nbsp; &nbsp;
<input type="radio" name="timeset" value="1" class='uk-radio'/> 在设内时间内有效
</td>
</tr>
<tr id='timestart' class="uk-hidden">
<td>开始时间：</td>
<td colspan="2">
<div class="uk-inline">
<span class="uk-form-icon uk-icon" uk-icon="icon: calendar4-week"></span>
<input class="uk-input uk-form-width-large uk-form-small" name="starttime" type="datetime-local" value="<?=$startDay;?>" placeholder="1970-01-01T00:00:00Z">
</div>
</td>
</tr>
<tr id='timeend' class="uk-hidden">
<td>结束时间：</td>
<td colspan="2">
<div class="uk-inline">
<span class="uk-form-icon uk-icon" uk-icon="icon: calendar4-week"></span>
<input class="uk-input uk-form-width-large uk-form-small" name="endtime" type="datetime-local" value="<?=$endDay;?>" placeholder="1970-01-01T00:00:00Z">
</div>
</td>
</tr>
<tr>
<td height="80">正常显示内容：</td>
<td width="76%">
<textarea name="normbody" id="normbody" style="width:80%;height:100" class='uk-textarea uk-form-small uk-form-width-large'></textarea>
</td>
<td width="9%">&nbsp;</td>
</tr>
<tr>
<td height="80">过期显示内容：</td>
<td>
<textarea name="expbody" id="expbody" style="width:80%;height:100" class='uk-textarea uk-form-small uk-form-width-large'></textarea>
</td>
<td>&nbsp;</td>
</tr>
<!-- /选项 -->
</table>
</div>
</div>
<div class="uk-card-footer " >
<div class="uk-padding-small" >
<button type="submit" class="uk-button uk-button-small uk-button-primary">提交</button>
</div>
</div>
</div>
</form>
<!-- 列表底部 -->
<div class="bar-bottom uk-flex uk-light uk-flex-right">
<div class="uk-button-group" style="margin-left: 50px;">
</div>
<div class="e1e02">Copyright &copy; 2007-2021 <a href='http://www.dedecms.com' target='_blank'><u>DedeCMS</u></a>, 上海卓卓网络科技有限公司 (DesDev, Inc.)</div>
</div>
<!-- 列表底部 -->
<!-- JS FILES -->
<script src="{dede:global.cfg_assets_dir/}/pkg/uikit/js/uikit.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/pkg/uikit/js/uikit-icons.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/pkg/jquery/jquery.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/js/dede.manage.min.js"></script>
<script language="javascript">
$(document).ready(function () {
$('input:radio[name=timeset]').click(function(){
if ($(this).val() == 0) {
$('#timestart').addClass('uk-hidden');
$('#timeend').addClass('uk-hidden');
}else {
$('#timestart').removeClass();
$('#timeend').removeClass();
}
});
})
</script>
<!-- / JS FILES -->
</body>
</html>
